﻿<UserControl x:Class="ViewParametrerGroupeCRT"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             xmlns:local="clr-namespace:OMANE.Modules.PMT"
             mc:Ignorable="d" 
             d:DesignHeight="300" d:DesignWidth="700">
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="Auto"/>

            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="*" />
            <ColumnDefinition Width="Auto"/>
            <ColumnDefinition Width="*" />
        </Grid.ColumnDefinitions>
    
        <GroupBox Grid.Row="1" Header="Gerer les Groupes provenant du CRT" Grid.ColumnSpan="3">
            <StackPanel Orientation="Horizontal"  >
                <TextBlock Text="Groupes" VerticalAlignment="Center" Margin="0,0,10,0"  />
                <ComboBox MinWidth="200" Margin="0,0,10,0" ItemsSource="{Binding ListeGroupesCrt}" SelectedItem="{Binding Path=GroupePmtActif, Mode=TwoWay}" />
                <Button Name="BtCreerCrtGroupePmt" Background="White" Content="Creer un nouveau groupe" Margin="0,0,10,0" Padding="2"  />
                <Button Visibility="Collapsed" Name="BtSupprimerCrtGroupePmt" Background="White" Content="Supprimer le groupe selectionné" Margin="0,0,10,0" Padding="2"/>
                <Button Background="White" Content="Tester l'homegeneite du groupe" Margin="0,0,10,0" Padding="2"  Name="TestHomogeneiteBt"/>

            </StackPanel>
        </GroupBox>
        <GroupBox Grid.Row="2" Header="Cles Crt de l'historique"  Margin="5">
            <local:AdvancedDatagrid  x:Name="CrtHistoDgrid" Margin="5" ItemsSource="{Binding ListeClesCrt}" IsReadOnly="True" ColumnWidth="*"/>
        </GroupBox>
        <GroupBox Grid.Row="2" Grid.Column="2" Header="Cles Crt du groupe" Margin="5">
            <local:AdvancedDatagrid x:Name="PmtGroupeCrtDgrid" Margin="5" ItemsSource="{Binding ListeClesCrtGroupePmtActif}" IsReadOnly="True" ColumnWidth="*">
                <local:AdvancedDatagrid.DefaultFilter>
                    <Binding Path="GroupePmtActif">
                        <Binding.Converter>
                            <local:VariableValueToFilterConverter ColumnName="GROUPE" />
                        </Binding.Converter>
                    </Binding>
                </local:AdvancedDatagrid.DefaultFilter>
            </local:AdvancedDatagrid>
        </GroupBox>
        <GridSplitter Grid.Column="1" Grid.Row="2" VerticalAlignment="Stretch" HorizontalAlignment="Stretch"  />
        <StackPanel VerticalAlignment="Center"   Grid.Column="1" Grid.Row="2" >
            <Button Content=" >>> " Margin="5" Name="BtSetGroupe" />
            <Button Content=" &lt;&lt;&lt; " Margin="5" Name="BtUnSetGroupe"/>

        </StackPanel>

    </Grid>
</UserControl>
